package tech.com.commoncore.basecomponent.empty_service;

import android.os.Bundle;
import android.support.v4.app.Fragment;

import com.vise.xsnow.event.BusManager;
import com.vise.xsnow.http.ViseHttp;

import tech.com.commoncore.user.CurrentUser;
import tech.com.commoncore.basecomponent.service.ILoginService;
import tech.com.commoncore.event.LoginChangeEvent;


/**
 * 默认的登陆模块接口
 */
public class EmptyLoginService implements ILoginService {

    @Override
    public CurrentUser getCurrentUser() {
        return null;
    }

    @Override
    public void logout() {
        ViseHttp.CONFIG().globalHeaders(null);
        BusManager.getBus().post(new LoginChangeEvent(false));
    }

    @Override
    public Fragment newUserFragment(Bundle bundle) {
        return DefaultFragment.newInstance();
    }

}
